package com.smartleanx.module.hrm.dal.mysql.examine.examinSon;

import java.util.*;

import com.smartleanx.framework.common.pojo.PageResult;
import com.smartleanx.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.smartleanx.framework.mybatis.core.mapper.BaseMapperX;
import com.smartleanx.module.hrm.dal.dataobject.examine.examinSon.ExamineDO;
import org.apache.ibatis.annotations.Mapper;
import com.smartleanx.module.hrm.controller.admin.examine.examinSon.vo.*;

/**
 * 考核计划 Mapper
 *
 * @author 宁无霜
 */
@Mapper
public interface ExamineMapper extends BaseMapperX<ExamineDO> {

    default PageResult<ExamineDO> selectPage(ExaminePageReqVO reqVO ,LambdaQueryWrapperX<ExamineDO> lambdaQueryWrapperX) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ExamineDO>()
                .likeIfPresent(ExamineDO::getExaminePlanName, reqVO.getExaminePlanName())
                .eqIfPresent(ExamineDO::getExamineCycleTypeId, reqVO.getExamineCycleTypeId())
                .eqIfPresent(ExamineDO::getExamineCycleStart, reqVO.getExamineCycleStart())
                .eqIfPresent(ExamineDO::getExamineIllustrate, reqVO.getExamineIllustrate())
                .eqIfPresent(ExamineDO::getExamineLimit, reqVO.getExamineLimit())
                .eqIfPresent(ExamineDO::getExamineState, reqVO.getExamineState())
                .eqIfPresent(ExamineDO::getExamineCycleEnd, reqVO.getExamineCycleEnd())
                .orderByDesc(ExamineDO::getId));
    }


}